<div>
  <div ng-if="collapseStagesOnCompletion">
    <div ng-if="build | isIncompleteBuild" ng-include="'views/directives/_build-pipeline-expanded.html'"></div>
    <div ng-if="!(build | isIncompleteBuild)" ng-include="'views/directives/_build-pipeline-collapsed.html'"></div>
  </div>
  <div ng-if="!collapseStagesOnCompletion" ng-include="'views/directives/_build-pipeline-expanded.html'"></div>
</div>
